<template>
    <div class="modular">
        <div class="btn" :class="{ 'btn-active': displayModule && !showAnother }" @click="modularOne">系统管理</div>
<!--        <div class="btn" :class="{ 'btn-active': !displayModule && !showAnother }" @click="modularTwo">计量资产</div>-->
        <div class="btn" :class="{ 'btn-active': showAnother && !displayModule }" @click="modularThree">工器具</div>
</div>
</template>

<script>
export default {
    data() {
        return {

        }
    },
    methods: {
        modularOne() {
            this.$emit("modularOne")
        },
        modularTwo() {
            this.$emit("modularTwo")
        },
        modularThree() {
            this.$emit("modularThree")
        }
    },
    props: ["displayModule", "showAnother"]
}
</script>

<style scoped lang="scss">
.modular {
    display: flex;
    flex-direction: row;
    box-sizing: border-box;
    width: 400px;

}

.btn {
    width: 78px;
    height: 24px;
    box-sizing: border-box;
    color: #606266;
    line-height: 24px;
    text-align: center;
    font-size: 12px;
    margin: 13px 5px 0;
    border-radius: 3px;
    border: 1px solid #DCDFE6;
    cursor: pointer;

    &-active {
        color: #409EFF;
        border: 1px solid #409EFF;
    }
}
</style>

